package com.chuxi.demo;

import java.lang.reflect.Proxy;

/**
 * @ Author:任留辉
 * @ Description:
 * @ Date:Created in 19:03 2021/7/23 0023
 */
public class Client {
    public static void main(String[] args) {
        personImpl person = new personImpl();
        //创建一个代理实例
        person p = (person) Proxy.newProxyInstance(person.getClass().getClassLoader(), person.getClass().getInterfaces(), new JDKProxy(person));
        System.out.println(p.add(10, 20));

    }
}
